/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#ifndef _CameraController_H_
#define _CameraController_H_

#include "Common.h"

#include <OIS/OIS.h>

namespace Fish3D
{
	class CameraController
	{
	public:
		static const int MoveSpeed=100;
		static const int RotateSpeed=36;

		CameraController(Ogre::Camera* camera);
		~CameraController();

		void update(float deltaT);
	protected:
		Ogre::Camera* _camera;
		Ogre::RaySceneQuery *_raySceneQuery;

		Ogre::Real _moveScale;
		Ogre::Real _rotScale;

		Ogre::Vector3 _translate;
		Ogre::Radian _rotX;
		Ogre::Radian _rotY;
	protected:
		void processKeyboard();
		void processMouse();
		void moveCamera();
		void keepAboveTerrain();
	};

}

#endif
